<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Strict//EN' 'http://www.w3.org/TR/html4/strict.dtd'>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<title>ajax实例及json</title>
<script src="jquery.js"></script>
</head>
<body>
	<input type="button" value="获取数据">
	<div id="info"></div>
	<script type="text/javascript">
	  $('input').click(function(){
		  $.ajax({
			  url:'demo22.php?'+Math.random(),
			  type:'get',
			  success:function(data){
				  //alert(data)
				  //$('#info').html(data);
				  var res = eval(data);
				  $('#info').html(res[0].title);
			  }
		  });
	  });
	</script>
</body>
</html>